package com.copa.module.order.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.copa.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * @author copa
 * @createDate 2021-01-09
 * @function   t_order表实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_order")
@ApiModel(value="Order对象", description="")
public class OrderEntity extends BaseEntity {

private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "订单编号")
    @TableField("order_sn")
    private String orderSn;

    @ApiModelProperty(value = "订单状态：0未支付 1已支付未发货 2已发货 3用户取消 4商家取消（支付与未支付都一样）5已发货部分取消或退款 6已退款")
    @TableField("order_status")
    private Integer orderStatus;

    @ApiModelProperty(value = "地址id")
    @TableField("address_id")
    private Long addressId;

    @ApiModelProperty(value = "订单价格")
    @TableField("goods_price")
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "实际付款")
    @TableField("actual_price")
    private BigDecimal actualPrice;

//    @ApiModelProperty(value = "下单时间")
//    @TableField("order_time")
//    private LocalDateTime orderTime;
//
//    @ApiModelProperty(value = "确认时间")
//    @TableField("confirm_time")
//    private LocalDateTime confirmTime;
//
//    @ApiModelProperty(value = "用户取消（未支付状态时）")
//    @TableField("user_cancel_time")
//    private LocalDateTime userCancelTime;
//
//    @ApiModelProperty(value = "商家取消（未支付已支付）")
//    @TableField("store_cancel_time")
//    private LocalDateTime storeCancelTime;

    @ApiModelProperty(value = "用户备注")
    @TableField("user_remark")
    private String userRemark;

    @ApiModelProperty(value = "商家备注")
    @TableField("store_remark")
    private String storeRemark;

    @ApiModelProperty(value = "快递公司")
    @TableField("express_company")
    private String expressCompany;

    @ApiModelProperty(value = "快递单号")
    @TableField("express_num")
    private String expressNum;



    public static final String USER_ID = "user_id";

    public static final String ORDER_SN = "order_sn";

    public static final String ORDER_STATUS = "order_status";

    public static final String ADDRESS_ID = "address_id";

    public static final String GOODS_PRICE = "goods_price";

    public static final String ACTUAL_PRICE = "actual_price";

    public static final String ORDER_TIME = "order_time";

    public static final String CONFIRM_TIME = "confirm_time";

    public static final String USER_CANCEL_TIME = "user_cancel_time";

    public static final String STORE_CANCEL_TIME = "store_cancel_time";

    public static final String USER_REMARK = "user_remark";

    public static final String STORE_REMARK = "store_remark";


}
